package com.anzia.demo08;

import java.util.Date;

/**
 *@ClassName Date_Demo
 *@Description
 *@Author Anzia.
 *@Date 2021/4/11 19:21
 *@Version 1.0
 **/
public class Date_Demo {
    public static void main(String[] args) {
        Date date = new Date();
        System.out.println(date.toString());
        System.out.println(date.toLocaleString());

        Date date1 = new Date();
        System.out.println(date1.getTime() - 60*60*24*1000);
        System.out.println(date1.toLocaleString());

        boolean after = date.after(date1);
        System.out.println(after);
        boolean before = date.before(date1);
        System.out.println(before);

        System.out.println(date1.compareTo(date));

        System.out.println(date.equals(date1));
    }
}
